#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QTimer>
#include <QDateTime>
#include <opencv2/opencv.hpp>
#include "interface.h"
#include <QSound>
namespace Ui {
class Widget;
}

class Widget : public QWidget
{
    Q_OBJECT

public:
    explicit Widget(QWidget *parent = nullptr);
    void timerEvent(QTimerEvent *event);
    ~Widget();

private  slots:
    void update();
    void on_pushButton_clicked();

private:
    Ui::Widget *ui;
    cv::VideoCapture cam;
    QTimer *timer;
    Face *face;
    long frame;
    cv::Rect range;
    int hit;
    int flag;
    int dataTimerId;
    Employee user;
    Database *db;
    QSound *sound;
};

#endif // WIDGET_H
